package com.you.weixinpay.controller;


import com.you.weixinpay.result.Result;
import com.you.weixinpay.service.TProductService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yzm
 * @since 2025-06-15
 */
@RestController
@RequestMapping("/api/product")
@RequiredArgsConstructor
@Tag(name = "商品")
public class TProductController {

    private final TProductService tProductService;

    @GetMapping("/list")
    @Operation(summary = "查询商品列表")
    public Result list() {
        return Result.success(tProductService.list());
    }
}

